package router

import (
	"net/http"

	"github.com/julienschmidt/httprouter"
)

// ...
func RegisterRouter() *httprouter.Router {
	router := httprouter.New()

	router.GET("/name/:name", Name)

	router.GET("/registerusersget", RegisterUsersGet)

	router.POST("/registeruserspost", RegisterUsersPost)

	router.POST("/json", RegisterUsersPOSTByJSON)

	// 静态文件服务器
	router.ServeFiles("/static/*filepath", http.Dir("./static"))
	return router
}
